-
Notifications
You must be signed in to change notification settings - Fork 762
Rename CLI to 'hf' + reorganize syntax #3229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excited for this! hf
feels so much more natural than huggingface-cli
One question: wouldn't it make our life simpler during maintenance and to remove the deprecation down the road, to move all commands from commands
to cli
while keeping a utility to still allow imports from commands
, rather than copy-pasting everything?
Keeping two copies means that it's easy for the two to diverge, and I don't think we want that even through the deprecation. If the syntax is too different from the original, feel free to ignore 🤗
Played around with it locally, it works great! When using the deprecated API (like huggingface-cli login
, you still get recommendations about the old API, maybe worth recommending only new APIs everywhere? But not key for this PR.
Ex:
- A token is already saved on your machine. Run `huggingface-cli whoami` to get more information or `huggingface-cli logout` if you want to log out.
+ A token is already saved on your machine. Run `hf auth whoami` to get more information or `hf auth logout` if you want to log out.
BTW, would brew (for instance) be ok with having two aliases (the current huggingface-cli and hf)? Might be worth checking with them |
Co-authored-by: Lysandre Debut <hi@lysand.re>
@LysandreJik I've updated all the documentation and tips to promote |
@LysandreJik as mentioned in DMs, I prefer to stick with the "duplicated code" approach. Even if it's not the cleanest solution, I see a few benefits to it:
|
Gentle ping to @singingwolfboy on this :) For context, we are switching the HF CLI from @singingwolfboy my questions are now: would brew be able to support 2 command lines like this? Or would it simply be a separate (gentle ping to @abitrolly who has maintained the brew script lately) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this PR @Wauplin! i mainly reviewed the API and tested the commands locally and it looks great, i love it! 🔥
Thanks everyone! I'll merge this one now. About brew (#3229 (comment)), I kept the previous |
Closes #3224.
Partly inspired by #3225 but I preferred to start from scratch.
Goal is to rename
huggingface-cli
tohf
+ harmonize the syntax. We mostly follow ahf <resource> <action> [options]
syntax similar to what's done by github CLI https://cli.github.com/manual/gh.Next steps will be to add new commands for a more consistent and feature-complete CLI, but story for another day!